<link rel="stylesheet" type="text/css" href="assets/bootstrap-datepicker/css/datepicker.css" />
<link rel="stylesheet" type="text/css" href="assets/tag/selectpage.css" />
<link rel="stylesheet" type="text/css" href="assets/tag/demo.css" />
<section id="main-content">
  <section class="wrapper">
    <!--state overview end-->
    <div class="row">
      <div class="col-lg-12">
        <section class="panel">
          <header class="panel-heading">
            基本信息
          </header>
          <div class="panel-body">
            <div class="form-group customerForm">
              <label class="col-sm-2 control-label">项目名称</label>
              <div class="col-sm-10">
                <input type="text" value="" proj-datalist="material.projName" class="form-control" certus-required placeholder="自动检索项目名称" ng-model="material.projName">
              </div>
            </div>
            <div class="form-group customerForm">
              <label class="col-sm-2 control-label">领取地点</label>
              <div class="col-sm-10">
                <select class="form-control" ng-model="material.area" certus-required  base-select-by-url="areaCode">
                  <option ng-repeat="ss in material.areaSelect" value="{{ss.code}}">{{ss.name}}</option>
                </select>
              </div>
            </div>
            <div class="form-group customerForm">
              <label class="col-sm-2 control-label">领取时间</label>
              <div class="col-sm-10">
                <input type="text" value="" id="ltime" certus-required class="form-control" ng-model="material.receptedTime">
              </div>
            </div>
            <div class="form-group customerForm">
              <label class="col-sm-2 control-label">领取人</label>
              <div class="col-sm-10">
                <input type="text" placeholder="输入后请选择" class="input-block-level" id="selectPageRecieve" ng-model="material.recepterId">
              </div>
            </div>
            <div class="form-group customerForm">
              <label class="col-sm-2 control-label">理由/备注说明</label>
              <div class="col-sm-10">
                <textarea class="form-control" certus-required certus-an-limit-length="120" placeholder="字符长度限制(120字以内)" ng-model="material.remark"></textarea>
              </div>
            </div>
            <div class="form-group customerForm">
              <label class="col-sm-2 control-label">是否勾选</label>
              <div class="col-sm-10">
                <div class="checkbox">
                  <label>
                    <input type="checkbox" id="zdcheck" onclick="shzdbox()"> 招待使用
                  </label>
                </div>
              </div>
            </div>
          </div>
        </section>

        <section class="panel" id="zdbox" ng-init="receptshow = false" ng-show="receptshow">
          <header class="panel-heading">
            招待信息
          </header>
          <div class="panel-body">
            <div class="form-group customerForm">
              <label class="col-sm-2 control-label">招待类型</label>
              <div class="col-sm-10">
                <select class="form-control" certus-required  ng-model="receptItem.receptType">
                  <option>外部招待</option>
                  <option>内部团建</option>
                </select>
              </div>
            </div>
            <div class="form-group customerForm">
              <label class="col-sm-2 control-label">招待日期</label>
              <div class="col-sm-10">
                <input id="zdtime" class="form-control" placeholder="招待日期" certus-required ng-model="receptItem.receptDate">
              </div>
            </div>
            <div class="form-group customerForm">
              <label class="col-sm-2 control-label">招待标准*</label>
              <div class="col-sm-10">
                <div class="input-group m-bot15">
                  <span class="input-group-addon">￥</span>
                  <input type="text"  certus-required certus-an-limit-length-num="10" class="form-control"
                         placeholder="具体金额" ng-model="receptItem.receptStandard">
                  <span class="input-group-addon">元</span>
                </div>
              </div>
            </div>
            <div class="form-group customerForm">
              <label class="col-sm-2 control-label">所在城市</label>
              <div class="col-sm-10">
                <input type="text" class="form-control" certus-required placeholder="所在城市(50字以内)" maxlength="50"
                        ng-model="receptItem.belongCity">
              </div>
            </div>
            <div class="form-group customerForm">
              <label class="col-sm-2 control-label">地点</label>
              <div class="col-sm-10">
                <input type="text" certus-required class="form-control" placeholder="具体地点(120字以内)" certus-an-limit-length-str="120" ng-model="receptItem.area"
                       >
              </div>
            </div>
            <div class="form-group customerForm">
              <label class="col-sm-2 control-label">备注</label>
              <div class="col-sm-10">
                <textarea class="form-control" certus-required placeholder="字数长度限制(120字以内)" certus-an-limit-length-str="120"  ng-model="receptItem.remark"
                         ></textarea>
              </div>
            </div>
            <div class="form-group customerForm">
              <label class="col-sm-2 control-label">客户单位名称</label>
              <div class="col-sm-10">
                <input class="form-control" certus-required placeholder="客户单位名称(120字以内)" certus-an-limit-length-str="120" ng-model="receptItem.cusUnitName">
              </div>
            </div>
            <div class="form-group customerForm">
              <label class="col-sm-2 control-label">决策人员</label>
              <div class="col-sm-10">
                <textarea class="form-control" placeholder="请输入人员姓名(120字以内)" certus-an-limit-length-str="120" ng-model="receptItem.disposableMan"
                          ></textarea>
              </div>
            </div>
            <div class="form-group customerForm">
              <label class="col-sm-2 control-label">经办人员</label>
              <div class="col-sm-10">
                <textarea class="form-control" placeholder="请输入人员姓名(120字以内)" certus-an-limit-length-str="120" ng-model="receptItem.handler"
                         ></textarea>
              </div>
            </div>
            <div class="form-group customerForm">
              <label class="col-sm-2 control-label">相关人员</label>
              <div class="col-sm-10">
                <textarea class="form-control" placeholder="请输入人员姓名(120字以内)" certus-an-limit-length-str="120" ng-model="receptItem.relatedUser"
                          ></textarea>
              </div>
            </div>
            <div class="form-group customerForm">
              <label class="col-sm-2 control-label">相关人员数量</label>
              <div class="col-sm-10">
                <input type="text" certus-an-limit-length-num="10" ng-model="receptItem.relatedUserNum"
                       class="form-control" placeholder="人员数量">
              </div>
            </div>
            <div class="form-group customerForm">
              <label class="col-sm-2 control-label">随同人员</label>
              <div class="col-sm-10">
                <textarea class="form-control" placeholder="请输入人员姓名(120字以内)" certus-an-limit-length-str="120" ng-model="receptItem.relatedUserNum"
                          ></textarea>
              </div>
            </div>
            <div class="form-group customerForm">
              <label class="col-sm-2 control-label">随同人员数量</label>
              <div class="col-sm-10">
                <input type="text" certus-an-limit-length-num="10" ng-model="receptItem.personnelNum"
                       class="form-control" placeholder="人员数量">
              </div>
            </div>
          </div>
        </section>

        <section class="panel" id="letbox" style="display:none;">
          <header class="panel-heading">
            物资领用
          </header>
          <div class="panel-body">
            <div class="form-group customerForm">
              <label class="col-sm-2 control-label">物资地点</label>

              <div class="input-group">
                <input type="text" class="form-control" certus-an-limit-length="50" certus-required-polyfill disabled ng-model="material.area" disabled>
              </div>
            </div>
            <div class="form-group customerForm">
              <label class="col-sm-2 control-label">物资种类</label>
              <div class="col-sm-10">
                <select class="form-control" certus-required-polyfill linkage-query-by-url="materialType" linkage-query-attrs="material.area" ng-model="materialItem.materTypeCode">
                  <option ng-repeat="xx in materialItem.materTypeCodeSelect" value="{{xx.code}}">{{xx.name}}</option>
                </select>
              </div>
            </div>
            <div class="form-group customerForm">
              <label class="col-sm-2 control-label">物资名称</label>
              <div class="col-sm-10">
                <select class="form-control" ng-model="materialItem.materName" certus-required-polyfill>
                  <option>全部</option>
                </select>
              </div>
            </div>
            <div class="form-group customerForm">
              <label class="col-sm-2 control-label">单价</label>
              <div class="col-sm-10">
                <div class="input-group">
                  <span class="input-group-addon">￥</span>
                  <input type="text" class="form-control" certus-an-limit-length-num="50" disabled ng-model="materialItem.unitPrice">
                  <span class="input-group-addon">元</span>
                </div>
              </div>
            </div>
            <div class="form-group customerForm">
              <label class="col-sm-2 control-label">数量</label>
              <div class="col-sm-10">
                <input type="text" certus-an-limit-length-num="20" class="form-control" certus-required-polyfill ng-model="materialItem.amount">
              </div>
            </div>
            <div class="form-group customerForm">
              <label class="col-sm-2 control-label">总价</label>
              <div class="col-sm-10">
                <div class="input-group">
                  <span class="input-group-addon">￥</span>
                  <input type="text" class="form-control" certus-an-limit-length-num="20" ng-model="materialItem.total" disabled>
                  <span class="input-group-addon">元</span>
                </div>
              </div>
            </div>
            <p class="default-buttons">
              <a href="javascript:void(0);" class="button-back btn btn-info" onclick="shLet();">取消</a>
              <a href="javascript:void(0);" class="button-next  btn btn-info" ng-click="addItemMater()">提交</a>
            </p>
          </div>
        </section>

        <section class="panel">
          <header class="panel-heading">
            领用列表
            <i class="add-icon icon-plus" onclick="shLet()"> 新增</i>
          </header>
          <div class="panel-body">
            <div id="letContainer" class="dlshouwen-grid-container"></div>
          </div>
        </section>


        <section class="panel">
          <div class="panel-body">
            <p class="default-buttons">
              <a href="javascript:void(0);" class="button-back btn btn-info" onclick="window.history.back()">返回</a>
              <a class="button-next  btn btn-success" href="javascript:void(0)" ng-click="receiveSubmit()">确认提交</a>
            </p>
          </div>
        </section>
      </div>
    </div>
  </section>
</section>
<script type="text/javascript" src="assets/bootstrap-datepicker/js/bootstrap-datepicker.js"></script>
<script type="text/javascript" src="js/autocomplete/jquery.autocomplete.js"></script>
<script type="text/javascript" src="tag/b.selectpage.js"></script>
<script type="text/javascript" src="tag/selectpage.js"></script>
<script type="text/javascript" src="assets/tag/js/demo.js"></script>
<script type="text/javascript" src="js/receives/index.js"></script>
<script>
    function shzdbox() {
        var status = $("#zdcheck").is(':checked');
        if (status) {
           $$scope.receptshow = true
        } else {
            $$scope.receptshow = false;
        }
        $$scope.$apply();
    }
</script>